<?php header("Content-Type: text/html; charset=ISO-8859-1",true);
include "../conexao.php";

session_start();

if (!isset($_SESSION["txt_login"])) 

{

  	print "<script type = 'text/javascript'> location.href = 'index.php'</script>";

}



$acao 	= $_GET["acao"];
$id 	= $_GET["id"];

if ($acao != "") 
{
	$sql = "SELECT * FROM categoria_servicos WHERE id_categoria= '$id'";
	$resultado = mysql_query ($sql);
	$linha = mysql_fetch_array($resultado);
	
	
	$categoria = $linha['categoria'];
	//$txt_categoria = $linha['txt_categoria'];

}


?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<style type="text/css">
<!--
.style1 {
	font-family: Arial, Helvetica, sans-serif;
	font-weight: bold;
	font-size: 20px;
}
-->
</style>
<link href="estilo.css" rel="stylesheet" type="text/css" />
</head>

<body><div id="conteudo">
<table width="99%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><?php if ($acao =="Excluir") {?><font color="#FF0000">Obs: Cuidado, ao excluir uma categoria todas as sub-categorias e an&uacute;ncios desta categoria tamb&eacute;m ser&atilde;o exclu&iacute;das</font><?php }?>
      <div align="right" ><font color="red"><a href="javascript:abre('lst_categoria_servicos.php','GET')">Voltar</a></font></div></td>
  </tr>
  <tr>
    <td><form id="form1" name="form1" method="post" action="op_categoria_servicos.php">
      <table width="51%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td class="meio"><table width="314" border="0" align="center" cellpadding="3" cellspacing="0">
            <tr>
              <td colspan="2" align="center" bgcolor="#CCCCCC" class="estilo_L"><label><span class="style1">Categorias Prod. Servi&ccedil;os</span></label></td>
            </tr>
            <tr>
              <td width="76" bgcolor="#F5F5F5" class="estilo_L"><strong>Categoria</strong></td>
              <td width="224" bgcolor="#F5F5F5" class="estilo_L"><input name="txt_categoria" type="text" id="txt_categoria" size="35" value= "<?php echo $categoria; ?>" /></td>
            </tr>
            <tr>
              <td colspan="2" bgcolor="#F5F5F5" class="estilo_L"><label>
                  <div align="center">
                    <input type="hidden" name="id" value= " <?php echo $id; ?>" />
                    <input type="hidden" name="acao" value = "<?php if ($acao !="") {echo $acao;} else { echo "Inserir";} ?>" />
                    <input type="submit" name="Submit" value="<?php if ($acao !="") {echo $acao;} else { echo "Inserir";} ?>" />
                  </div>
                </label></td>
            </tr>
          </table></td>
        </tr>
      </table>
    </form></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
  </tr>
</table></div>
</body>
</html>
